package com.webtest.dao;

import com.webtest.entity.Book;
import com.webtest.entity.BookShelf;
import com.webtest.entity.Shelf;
import com.webtest.vo.SearchBooks;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface BookShelfMapper {
    // 根据书架查找书籍信息
    List<Book> getAllBookByShelfId(SearchBooks searchBooks);

    // 根据书籍查找书架信息
    List<Shelf> getAllShelfByBookId(SearchBooks searchBooks);

    // 新增书架书籍
    void addBookShelf(BookShelf bookShelf);

    // 更新书架书籍数量
    void updateBookShelfByCount(BookShelf bookShelf);

    List<BookShelf> getBookShelf(SearchBooks searchBooks);

}
